package de.hsb.ai.domain;

import game.Move;
import jade.core.AID;
import jade.domain.introspection.Event;

public class MoveEvent implements Event {

	private static final long serialVersionUID = -6490398895237995652L;

	private int from;
	
	private AID player;
	
	private int playerIndex;
	
	private Move move;
	
	private int round;
	
	public int getFrom() {
		return from;
	}

	public void setFrom(int from) {
		this.from = from;
	}

	public Move getMove() {
		return move;
	}
	
	public void setMove(Move move) {
		this.move = move;
	}

	public AID getPlayer() {
		return player;
	}

	public void setPlayer(AID player) {
		this.player = player;
	}

	public int getPlayerIndex() {
		return playerIndex;
	}

	public void setPlayerIndex(int playerIndex) {
		this.playerIndex = playerIndex;
	}
	
	public void setRound(int round) {
		this.round = round;
	}
	
	public int getRound() {
		return round;
	}

	@Override
	public String getName() {
		return ScotlandJadeVocabulary.MOVE_EVENT;
	}
	
	@Override
	public String toString() {
		return String.format("MoveEvent: [%s] %d -> %d by %d", 
				player.getLocalName(), from, move.getNode(), move.getType());
	}

}
